feat(web,server): support custom provider - #146
Merged
Conversation
airslice
requested review from
mkumbobeaty,
pyshx,
rot1024 and
soneda-yuya
as code owners
May 24, 2026 17:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a comprehensive backward compatibility and fallback system for tile/terrain providers, integrates Sentinel for authenticated asset access, and updates the data attribution system. The changes ensure existing projects continue working while gracefully handling migration to new provider types.
Statistics:
48 files changed, 5,292 insertions(+), 94 deletions(-)🎯 Major Features
1. Compatibility System (New)
A complete backward compatibility and fallback system for scene properties.
Frontend (
web/src/classic/components/molecules/Visualizer/compatibility/):default→cesium_ion,stamen_toner→open_street_map, etc.arcgis→reearth_terraincesium_ion→google_satellite)Migration Rules Applied:
defaultcesium_iondefault_labelcesium_iondefault_roadcesium_ionblack_marblecesium_ionstamen_toneropen_street_mapesri_world_topoopen_street_maparcgis(terrain)reearth_terrain2. Database Migrations (Server)
New Migration Scripts:
260525000715_update_tile_and_terrain_providers.go- Forward migration for tile/terrain types260525000715_revert_tile_and_terrain_providers.go- Recovery migration (not auto-registered)Migration Safety:
3. Sentinel Integration (New)
Secure, authenticated asset access through Bearer token authentication.
Features:
Files Added:
web/src/services/sentinel/- Service implementationpublic/sentinel-sw.js- Service worker (701 lines)Configuration:
Improvements:
New Presets Added (web/src/classic/components/molecules/Visualizer/Engine/Cesium/core/presets.ts):
🔧 Bug Fixes
Imagery Provider Recreation
File: web/src/classic/components/molecules/Visualizer/Engine/Cesium/core/Imagery.tsx
Issue: Imagery providers weren't being recreated when cesiumIonAccessToken changed for tiles using Cesium Ion (like default, default_label, etc.)
Fix: Extended token change detection to include all Cesium Ion-dependent tile types:
// Now recreates provider for these tile types when token changes:
Result: ✅ Test Imagery.test.ts now passes
📊 Test Coverage
Frontend Tests
Backend Tests
Total: 55+ tests added/updated
📝 Documentation Added
- web/src/classic/components/molecules/Visualizer/compatibility/README.md (179 lines)
- BACKWARD_COMPATIBILITY.md (156 lines)
- FALLBACKS.md (218 lines)
- web/src/services/sentinel/README.md (133 lines)
Total: 686 lines of documentation
🔄 Data Flow
Input: sceneProperty
↓
[1] Apply plugin overrides (useOverriddenProperty)
↓
[2] Apply backward compatibility (migrate old types)
↓
[3] Apply fallbacks (if no Cesium Ion token)
↓
Output: Transformed sceneProperty
⚙️ Configuration Changes
Docker (web/docker/reearth_config.json.template):
Package (web/package.json):
🎯 Breaking Changes
None - This PR is fully backward compatible:
🚀 Migration Path
📦 Files Changed
Added (18 files)
Modified (30 files)
✅ Checklist